#include "deploy.h"
#include "lib_io.h"
#include "lib_time.h"
#include "stdio.h"

int main(int argc, char *argv[])
{
    print_time("Begin");
    char *topo[MAX_EDGE_NUM];
    int line_num;

    argv[1] = "/Users/mordekaiser/Desktop/HuaWei/代码版本/NewHuaWei-31-初赛结束终极版/case_example/第二批练习用例/0/case1.txt";
    char *topo_file = argv[1];
    
    line_num = read_file(topo, MAX_EDGE_NUM, topo_file);

    printf("line num is :%d \n", line_num);
    if (line_num == 0)
    {
        printf("Please input valid topo file.\n");
        return -1;
    }

    argv[2] = "/Volumes/Macintosh HD/Users/mordekaiser/Documents/cpp_execise/NewHuaWei/case_example/第一批练习用例/result0.txt";
    char *result_file = argv[2];

    deploy_server(topo, line_num, result_file);

    release_buff(topo, line_num);

    print_time("End");

	return 0;
}

